package com.autorun.server.controller;

import com.autorun.server.dto.ApiResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 健康检查控制器
 * 
 * @author autorun
 * @version 1.0.0
 */
@RestController
public class HealthController {

    /**
     * 健康检查
     * 
     * @return 健康状态
     */
    @GetMapping("/health")
    public ApiResponse<Map<String, Object>> health() {
        Map<String, Object> healthInfo = new HashMap<>();
        healthInfo.put("status", "ok");
        healthInfo.put("message", "Server is running");
        healthInfo.put("timestamp", System.currentTimeMillis());
        
        return ApiResponse.success(healthInfo);
    }
}